HealthCategoryType PRO

The HealthCategoryType identifies discrete health-related states or events, often recorded as binary values (e.g., present or not present) or discrete outcomes. These are commonly used for tracking symptoms, reproductive health, audio exposure events, and sleep states.


1. Apple Events and System Health

IdentifierDescription
appleStandHourIndicates whether the user stood up during an hour
environmentalAudioExposureEventNotifies of high environmental noise exposure
headphoneAudioExposureEventIndicates potentially harmful headphone volume exposure
highHeartRateEventDetects unusually high heart rate during inactivity
lowHeartRateEventDetects unusually low heart rate
irregularHeartRhythmEventFlags irregular heart rhythms (e.g., AFib)
lowCardioFitnessEventIndicates low cardio fitness level
appleWalkingSteadinessEventIndicates risk of falling due to walking instability

2. Mindfulness and Hygiene

IdentifierDescription
mindfulSessionLogs a mindfulness session
handwashingEventDetects handwashing activity (Apple Watch)
toothbrushingEventLogs toothbrushing sessions (e.g., via sensors)

3. Reproductive and Menstrual Health

IdentifierDescription
menstrualFlowRecords menstrual bleeding and its severity
intermenstrualBleedingBleeding between menstrual periods
prolongedMenstrualPeriodsPeriods longer than usual
infrequentMenstrualCyclesInfrequent cycle occurrence
irregularMenstrualCyclesIrregular cycle patterns
persistentIntermenstrualBleedingOngoing bleeding between cycles
bleedingDuringPregnancyBleeding while pregnant
bleedingAfterPregnancyPostpartum bleeding
pregnancyIndicates whether the user is pregnant
lactationIndicates breastfeeding or milk production
sexualActivityLogs sexual activity
ovulationTestResultOvulation test result (positive, negative)
pregnancyTestResultPregnancy test result
progesteroneTestResultProgesterone test outcome
contraceptiveContraceptive method being used
cervicalMucusQualityTracks type of cervical mucus

4. Sleep and Breathing

IdentifierDescription
sleepAnalysisSleep duration and categorization (e.g., in bed, asleep)
sleepApneaEventDetected apnea event during sleep

5. Symptoms and Conditions

IdentifierDescription
abdominalCrampsStomach or menstrual cramps
acneAcne severity
appetiteChangesIncrease or decrease in appetite
bladderIncontinenceUrinary control issues
bloatingFeeling of abdominal swelling
breastPainPain or tenderness in the breast
chestTightnessOrPainTightness or discomfort in the chest
chillsSudden feeling of cold without cause
constipationDifficulty passing stool
coughingCough symptom
diarrheaLoose or watery stools
dizzinessFeeling lightheaded or unsteady
drySkinSkin dryness
faintingTemporary loss of consciousness
fatigueGeneral tiredness or low energy
feverElevated body temperature
generalizedBodyAcheFull body soreness or aching
hairLossNotable hair thinning or shedding
headacheHead pain
heartburnBurning sensation in chest or throat
hotFlashesSudden feeling of warmth (commonly in menopause)
lossOfSmellAnosmia (loss of smell)
lossOfTasteAgeusia (loss of taste)
lowerBackPainPain in the lower back
memoryLapseDifficulty remembering
moodChangesMood swings or emotional variation
nauseaSensation of wanting to vomit
nightSweatsSweating during sleep
pelvicPainPain in the lower abdominal area
rapidPoundingOrFlutteringHeartbeatPalpitations or abnormal heart rhythms
runnyNoseNasal discharge
shortnessOfBreathDifficulty breathing
sinusCongestionNasal blockage due to sinus inflammation
skippedHeartbeatNoticeable skipped or irregular heartbeats
sleepChangesChanges in sleep quality or duration
soreThroatThroat irritation or pain
vaginalDrynessLack of natural vaginal lubrication
vomitingExpelling stomach contents
wheezingWhistling sound while breathing

Use Cases

  • Reproductive Health Apps: Use types like menstrualFlow, ovulationTestResult, pregnancy, and lactation to help users track fertility and cycles.
  • Mindfulness and Lifestyle: Use mindfulSession, handwashingEvent, and toothbrushingEvent for promoting daily habits.
  • Sleep and Heart Monitoring: Use sleepAnalysis, sleepApneaEvent, and heart rhythm-related types to provide nighttime and cardiovascular insights.
  • Symptom Trackers: Use symptom-related types (e.g., fatigue, fever, nausea) in journaling, recovery, or diagnostics support apps.

Example: Save a Sleep Stage Sample

const sample = HealthCategorySample.create({
  type: "sleepAnalysis",
  startDate: new Date("2025-07-03T22:30:00"),
  endDate: new Date("2025-07-04T06:30:00"),
  value: HealthCategoryValueSleepAnalysis.asleepDeep
})

await Health.saveCategorySample(sample)

Example: Query Mindful Sessions

const results = await Health.queryCategorySamples({
  type: "mindfulSession",
  startDate: new Date("2025-07-01"),
  endDate: new Date("2025-07-05")
})

for (const session of results) {
  console.log("From", session.startDate, "to", session.endDate)
}

Notes

  • The value provided to a category sample must match the expected enum for the given type.
  • If the value does not match the required category value type, the create() method will return null.
  • Samples must span at least one second (endDate > startDate).